proc disable {nick handle host chan otbn1} {
  global home botnick bcast

  if {$otbn1 == ""} {
    putquick "NOTICE $nick :\0034ERROR - Invaild Syntax - Should Be - (/msg) $botnick disable <#channel> <user>"
    return 0
  }

  if {[onchan $otbn1 $chan]} {
    set hand2 [nick2hand $otbn1 $chan]
  } else {
    set hand2 $otbn1
  }

  if {[matchattr $hand2 D]} {
    putquick "NOTICE $nick :\0034ERROR - The user '\002$hand2\002' is currently disabled."
    return 0
  } elseif {[string tolower $hand2] == [string tolower $handle]} {
    putquick "NOTICE $nick :\0034ERROR - Unable disable own account.  Get another user of higher permissions to do so."
    return 0
  } elseif {[string tolower $hand2] == [string tolower $botnick]} {
    putquick "NOTICE $nick :\0034ERROR - Unable to disable bot."

    if {$bcast == "1"} {
      putquick "PRIVMSG $home :\002$nick\002 ($host) tried to make me disable myself."
    }
    return 0
  } elseif {![validuser $hand2]} {
    putquick "NOTICE $nick :\0034ERROR - Could not find '\002$hand2\002' in my user partition."
    return 0
  } elseif {![checkaccess $handle $chan $hand2]} {
    putquick "NOTICE $nick :\0034ERROR - Unable To Execute Command - Permission Denied."
    putquick "NOTICE $otbn1 :\002$nick\002 ($host) tried to disable your user account."
    return 0
  } else {

    putlog "!$nick ($host)! disable $hand2"
    putquick "NOTICE $nick :\0033Sucessfully disabled user account '\0034\002$hand2\002\0033'" 

    if {$bcast == "1"} {
      putquick "PRIVMSG $home :\002$nick\002 ($host) requested me to disable the user account '\002$hand2\002'"
    }

    set permissions [chattr $hand2] 
    setuser $hand2 XTRA "DISABLED-PERMISSIONS" +$permissions 
    chattr $hand2 -$permissions
    chattr $hand2 +D
    save

    # Disconnect the newly disabled user from DCC
    set console [hand2idx $hand2]
    if {$console != "-1"} {
      killdcc $console
    }

    return 0
  }
}

